/*
//----------------------假接口ts类型定义
import type { showElement, oneFriendOneMessage } from "../friend/type"

//登录接口携带参数的ts类型
export interface loginFormData {
  username: string
  password: string
}

//定义全部接口返回数据都有的ts类型
interface responseData {
  code: number
  message: string
  ok: boolean
}

//定义登录成功服务器返回的消息的ts类型
export interface loginResponseData extends responseData {
  data: string
}

//定义一个好友的ts类型
export interface friend {
  userId: number
  username: string
  avatar: string
  realname: string
  newestMessage: oneFriendOneMessage
}

//定义服务器返回用户信息相关的数据类型
export interface userInfo {
  userId: number
  avatar: string
  username: string
  password: string
  realname: string
  desc: string
  routes: friend[]
  token: string
  chatMessages: showElement[]
}

//定义获取用户信息返回数据类型
export interface userInfoResponseData extends responseData {
  data: userInfo
}
*/

//注册接口携带参数的ts类型
export interface registerFormData {
    username: string
    password: string
    confirmPassword: string
    realname: string
}

//登录接口携带参数的ts类型
export interface loginFormData {
    username: string
    password: string
}

//定义全部接口返回数据都有的ts类型
export interface responseData {
    code: number
    message: string
}

//定义登录成功服务器返回的消息的ts类型
export interface loginResponseData extends responseData {
    data: {
        token: string
    }
}

//定义服务器返回用户信息的数据类型
export interface userInfo {
    userId: number
    avatar: string
    username: string
    realname: string
    description: string
}

export interface editAvatarFormData {
    userId: number
    newAvatar: string | null
}

export interface editAvatarResponseData extends responseData {
    data: string
}
